package com.kfm.Collection;

import com.kfm.model.KfmFile;
import com.kfm.service.KfmFileService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

@Controller
public class UserCollection {
    KfmFileService fileService = new KfmFileService();

    @RequestMapping("/list")
    public ModelAndView UserAll(){
        ModelAndView mv = new ModelAndView();
        List<KfmFile> kfmFiles = fileService.selectAll();
        mv.addObject("file",kfmFiles);
        mv.setViewName("list");
        return mv;

    }
}
